/* 直接更新state的多个方法的对象 */
// import * as types from './types'
import {
  RECEIVE_REPORT_CONTENT,
  RECEIVE_REPORT_CONTENT_PROF,
  RECEIVE_REPO_SUMMARY_PIE,
  RECEIVE_REPO_SUMMARY_LINE,
  RECEIVE_GROUPS,
  RECEIVE_PROF_INFO,
  RECEIVE_STUDENTS,
  RECEIVE_REPO_GROUP_LIST,
  RECEIVE_REPO_RECENT_LIST,
  RECEIVE_GROUP_OF_STU,
  RECEIVE_ALL_GROUPS,
  RECEIVE_GROUP_MEMBER,
  RECEIVE_STU_LIST_DIMLOOK,
  RECEIVE_GROUP_LIST_DIMLOOK
} from './mutation-types'

export default{
  // 修改showFlagOfReport的状态
  stageShowFlagOfReport (state, showFlagOfReport) {
    state.showFlagOfReport = showFlagOfReport
  },
  // 在注册/登录页面获取当前位置
  stageCurrentPosition (state, currentPosition) {
    state.currentPosition = currentPosition
  },

  // 待办事项
  // 正在进行中的待办事项
  stageOngoingTodos (state, ongoingTodos) {
    state.ongoingTodos = ongoingTodos
  },

  // 已完成的待办事项
  stageDoneTodos (state, doneTodos) {
    state.doneTodos = doneTodos
  },

  // 待办事项分类列表
  stageTodoTypeList (state, todoTypeList) {
    state.todoTypeList = todoTypeList
  },

  // 某具体待办事项（用于页面间的信息传递）
  stageCertainTodo (state, certainTodo) {
    state.certainTodo = certainTodo
  },

  // 待办是否为导师安排
  stageIsTutorArrange (state, isTutorArrange) {
    state.isTutorArrange = isTutorArrange
  },
  // 日报部分
  //获取选中开放的汇报类型
  stageReportTypes(state, groupReportTypes) {
    state.reportTypeRecords = groupReportTypes
  },
  // 获取到选中的分组信息
  recordGroupPresent (state, groupPresent) {
    state.groupPresent = groupPresent
  },

  // 获取到所有实验室
  recordAllLab (state, allLabs) {
    state.allLabs = allLabs
  },

  //存放综合查看页面选择的按钮类型：年报、月报、周报
  recordReviewType (state, reviewType) {
    state.reviewType = reviewType
  },

  //存放修改年/月/周那条数据查询所需的reportType和date
  recordReviewItem (state, reviewItem) {
    state.reviewItem = reviewItem
  },

  // 获取到所有待办事项
  recordAllBacklog (state, allBacklog) {
    state.allBacklog = allBacklog
  },

  [RECEIVE_REPORT_CONTENT] (state, {reportContent}) {
    state.reportContent = reportContent
  },

  [RECEIVE_REPORT_CONTENT_PROF] (state, {reportContentProf}) {
    state.reportContentProf = reportContentProf
  },

  stageReportContentProf (state, reportContentProf) {
    state.reportContentProf = reportContentProf;
  },


  [RECEIVE_REPO_SUMMARY_PIE] (state, {repoSummaryPie}) {
    state.repoSummaryPie = repoSummaryPie
  },

  [RECEIVE_REPO_SUMMARY_LINE] (state, {repoSummaryLine}) {
    state.repoSummaryLine = repoSummaryLine
  },
  // 获取柱状图的数据
  stageRepoSummaryBar (state, repoSummaryBar) {
    state.repoSummaryBar = repoSummaryBar
  },

  [RECEIVE_GROUPS] (state, {groups}) {
    state.groups = groups
  },

  [RECEIVE_PROF_INFO] (state, {profInfo}) {
    state.profInfo = profInfo
  },

  [RECEIVE_STUDENTS] (state, {students}) {
    state.students = students
  },

  [RECEIVE_REPO_GROUP_LIST] (state, {repoGroupList}) {
    state.repoGroupList = repoGroupList
  },

  [RECEIVE_REPO_RECENT_LIST] (state, {repoRecentList}) {
    state.repoRecentList = repoRecentList
  },

  [RECEIVE_GROUP_OF_STU] (state, {groupsOfStu}) {
    state.groupsOfStu = groupsOfStu
  },

  [RECEIVE_ALL_GROUPS] (state, {allGroups}) {
    state.allGroups = allGroups
  },
  // 获取柱状图的数据
  stageGroups (state, allGroups) {
    state.allGroups = allGroups
  },

  [RECEIVE_GROUP_MEMBER] (state, {groupMember}) {
    state.groupMember = groupMember
  },

  [RECEIVE_STU_LIST_DIMLOOK] (state, {stuListDimlook}) {
    state.stuListDimlook = stuListDimlook
  },

  [RECEIVE_GROUP_LIST_DIMLOOK] (state, {groupListDimlook}) {
    state.groupListDimlook = groupListDimlook
  },

  // 同步获取疫情汇报
  getEpidemicSummary (state, epidemicSummaryResult) {
    state.epidemicSummaryResult = epidemicSummaryResult // 存到state里面
  },

  // 存储被选中的群成员信息
  stageMemberSelected(state, memberSelected) {
    state.memberSelectedInfo = memberSelected
  },

  // 存储是否为群主
  stageIsGroupOwner(state, isGroupOwner) {
    state.isGroupOwner = isGroupOwner
  },
  // 存储是否为群管理员
  stageIsGroupAdmin(state, isGroupAdmin) {
    state.isGroupAdmin = isGroupAdmin
  },
  // 存储是否为群主
  stageMemberMap(state, memberMap) {
    state.memberMap = memberMap
  },
  stageGroupNameDividedList (state, groupNameDivided) {
    state.groupNameDividedList = groupNameDivided
  },
  stageGroupNameWhole (state, groupNameWhole) {
    state.groupNameWhole = groupNameWhole
  },
  stageAnnouncementSelected (state, announcement) {
    state.announcementSelected = announcement;
  },

  //日程部分
  stageModifySchedule(state, modifySchedule) {
    state.modifySchedule = modifySchedule
  },

  // 获取到周报
  stageReportContentWeek (state, reportContentWeek) {
    state.reportContentWeek = reportContentWeek
  },
  // 获取到月报
  stageReportContentMonth (state, reportContentMonth) {
    state.reportContentMonth = reportContentMonth
  },
  // 获取到年报
  stageReportContentYear (state, reportContentYear) {
    state.reportContentYear = reportContentYear
  },
  // 获取到毕业总结
  stageReportContentGraduate (state, reportContentGraduate) {
    state.reportContentGraduate = reportContentGraduate;
  },


  stageModifyContentDay (state, modifyContentDay) {
    state.modifyContentDay = modifyContentDay
  },

  //日报评论相关
  stageReportCommented (state, reportCommented) {
    state.reportCommented = reportCommented
  },
  stageCommentType (state, commentType) {
    state.commentType = commentType
  },
  stageCommentSelected (state, commentSelected) {
    state.commentSelected = commentSelected
  },
  stageReportListQuery (state, reportListQueryParams) {
    state.reportListQueryParams = reportListQueryParams
  },
  stageCurrentGroupId (state, currentGroupId) {
    state.currentGroupId = currentGroupId
  },

  stageLocationParam (state, location) {
    state.locationParam = location;
  }
}
